#' translate var from level to TB
#' @param regdata a data frame inculde 3 coloumns at least, 'yr','mon','var'
#' @param var a character which is column name, and the coloumn will be translated
#' @return a numeric vector which is TB
FromLevelToTB <- function(regdata, var = 'ARG_gdp', to = 'TB'){
  regdata$yr <- stringr::str_split_fixed(regdata$date,'M',2) %>% .[,1] %>% as.numeric()
  regdata$mon <- stringr::str_split_fixed(regdata$date,'M',2) %>% .[,2] %>% as.numeric()
  regdata[,var] <- exp(regdata[,var])
  return(TBHB::ConvertRatio(value.name = var,
                                      data = regdata[,c('yr','mon',var)], to = to) %>%
    .[,paste(var,to,sep = '')])
}
